package com.showgood.core {
	import flash.events.Event;
	import flash.events.EventDispatcher;
	/**
	 * 消息分发处理器
	 * @author bianpeng
	 */
	public class NotificationDispatcher {
		private var _dispatcher:EventDispatcher;
		private var _events:Array;
		
		public function NotificationDispatcher() {
			_dispatcher = new EventDispatcher();
			_events = new Array();
		}
		
		public function addHandler(event:String, func:Function):void {
			_events.push(event);
			_dispatcher.addEventListener(event, func);
		}
		
		public function dispatch(event:NotificationEvent):void {
			_dispatcher.dispatchEvent(event);
		}
		
		public function get events():Array {
			return _events;
		}
	}

}

